﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class Add_Cost_Apply : System.Web.UI.Page
    {
        string Flag = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            Flag = Request["Flag"].Trim().ToString();
            if (!IsPostBack)
            {


                ViewState["UrlReferrer"] = Request.UrlReferrer.ToString();
            }

        }

        protected void Button2_Click(object sender, EventArgs e)
        { UserInfo us = new UserInfo();
                    us.Init(Request.Cookies["UserPhone"].Value.ToString());
            DBS md = new DBS();

            md.Add_Apply(Flag, TextBox3.Text, double.Parse(TextBox1.Text.ToString()), double.Parse(TextBox2.Text.ToString()), us.ChineseName);

            Response.Redirect((String)ViewState["UrlReferrer"]);
        }
    }
}